<ui:composition
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">  
            
    <div class="sidePanelComponents">
        <ice:outputStyle href="/css/style.css" />
        <ice:outputText value="#{customerBackingBean.loginStatus}" />
        <ice:form>
            <ice:commandLink value="logout" rendered="#{!customerBackingBean.showLogin}" actionListener="#{customerControllerBean.logout}" />
        </ice:form>
        <ice:form rendered="#{customerBackingBean.showLogin}">
            <ice:message for="email"/>
            <ice:message for="password"/>
            <ice:panelGrid columns="2">
                <ice:outputLabel for="name" value="Email:" />
                <ice:inputText id="email" value="#{customerBackingBean.email}" required="true" size="12" />
                <ice:outputLabel for="password" value="Password:" />
                <ice:inputSecret id="password"  value="#{customerBackingBean.password}" required="true" size="12" />
                <ice:commandButton value="Login" actionListener="#{customerControllerBean.login}" />            
            </ice:panelGrid>
        </ice:form>
        <ice:form>
            <ice:commandLink value="Register" rendered="#{customerBackingBean.showLogin}" actionListener="#{customerControllerBean.showRegisterDialog}" />
            <ice:commandLink value="Show orders" rendered="#{!customerBackingBean.showLogin}" actionListener="#{customerControllerBean.showOrderDialog}" />
        </ice:form>

    </div>
</ui:composition>
